package com.lovebridge.ui;

import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.Page;
import org.zkoss.zkplus.databind.AnnotateDataBinderInit;

import java.util.Map;

public class Params2VirableInit extends AnnotateDataBinderInit
{
    @Override
    public void doInit(Page page, Map args) {
        Map<String, Object> params = Executions.getCurrent().getArg();
        for (String key : params.keySet())
        {
            page.setAttribute(key, params.get(key),Page.PAGE_SCOPE);
        }
        super.doInit(page, args);
    }
}
